import java.util.Scanner;

public class Homework {

    //在同一个类中定义多个方法：要求不仅可以求2个整数的最大值，还可以求3个小数的最大值？
    public static int max(int n1, int n2) {
        return Math.max(n1, n2);
    }

    public static float max(float a, float b, float c) {
        return Math.max(Math.max(a, b), c);
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        int b = in.nextInt();
        System.out.println("max = " + max(a, b));
        float c = in.nextFloat();
        float d = in.nextFloat();
        float e = in.nextFloat();
        System.out.println("max = " + max(c, d ,e));
    }

    //    求斐波那契数列的第n项。(迭代实现)
    public static void main4(String[] args) {
        int n1 = 0;
        int n2 = 1;
        int tmp = 0;
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        for (int i = 3; i <= n; i++) {
            tmp = n1 + n2;
            n1 = n2;
            n2 = tmp;
        }
        System.out.println(tmp);
        in.close();
    }
    //    求1！+2！+3！+4！+........+n!的和
    public static int factorial(int n) {
        int ret = 1;
        for (int i = 1; i <= n; i++) {
            ret *= i;
        }
        return ret;
    }

    public static void main3(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int sum = 0;
        for (int i = 1; i <= n; i++) {
            sum += factorial(i);
        }
        System.out.println("1！+2！+3！+4！+........+n! = "+sum);
        scan.close();
    }
    /*
    * 编写代码模拟三次密码输入的场景。 最多能输入三次密码，密码正确，提示“登录成功”,密码错误， 可以重新输 入，最多输入三次。三次均错，则提示退出程序 */
    public static void passwdIn(String passwd) {
        boolean flg = true;
        Scanner in = new Scanner(System.in);
        for (int i = 1; i <= 3; i++){
            String pwIn = in.nextLine();
            if (pwIn.equals(passwd)) {
                System.out.println("登录成功!");
                flg = true;
                break;
            } else {
                System.out.println("密码错误");
                flg = false;
            }
        }
        if (!flg) {
            System.out.println("退出程序!");
        }
        in.close();
    }

    public static void main2(String[] args) {
        String passwd = "123456";
        passwdIn(passwd);
    }
    /*
    * 输出一个整数的每一位，如：123的每一位是3，2，1*/
    public static void print(int num) {
        int a = 0;
        do {
            a = num % 10;
            num /= 10;
            System.out.print(a + " ");
        } while(num != 0);
        System.out.println();
    }
    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextInt()) {
            print(in.nextInt());
        }
        in.close();
    }

}
